import React from 'react'
// import ReactDOM from 'react-dom' v16.8和v17的写法
import ReactDOM from 'react-dom/client' //v18的新写法
import './index.css'
import App from './App'
import reportWebVitals from './reportWebVitals'

// ReactDOM.render(虚拟dom, 根标签的dom) v16.8和v17的写法
// v18的写法
const root = ReactDOM.createRoot(document.getElementById('root'))
root.render(
  // react严格模式
  <React.StrictMode>
    <App />
  </React.StrictMode>
)

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals()
